package com.tiamo.chatgpt.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.util.Date;

/**
 * 用户
 *
 * @author luozhiwei
 * @date 2023/6/5 下午10:48
 */
@Data
@Accessors(chain = true)
@NoArgsConstructor
@AllArgsConstructor
@TableName("tb_user")
public class UserEntity {

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @TableField("phone")
    private String phone;

    @TableField("password")
    private String password;

    @TableField("api_key")
    private String apiKey;

    @TableField("pic")
    private String pic;

    /**
     * 0-试用1-包月用户2-包年用户3-专属用户
     */
    @TableField("level")
    private Integer level;

    @TableField(value = "cr_time")
    private Date crTime;

    @TableField(value = "up_time")
    private Date upTime;
}
